feat: array/list parameter support for Gestalt-DI annotations - #160
Conversation
2d99dbb to
b2a6b05
Compare
|
@coderabbitai full review |
✅ Actions performedFull review triggered. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughSummary by CodeRabbit
WalkthroughCross-module changes prevent self-closing bean contexts, update JavaPoet, improve annotation-value formatting, fix classpath path construction, correct snapshot detection, and bump the project version. ChangesCore behavior and release updates
Estimated code review effort: 3 (Moderate) | ~20 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In
`@gestalt-inject-java/src/main/java/org/terasology/gestalt/annotation/processing/BeanDefinitionProcessor.java`:
- Line 247: In the values.add(...) call that currently passes
executableElement.asType() into getValue(...), replace asType() with
executableElement.getReturnType() so getValue() receives the annotation member's
return type (not the full executable signature); update the invocation near
values.add(CodeBlock.of("$S,$L", executableElement.getSimpleName(),
getValue(executableElement.asType(), value.getValue()))) to use getReturnType()
to fix enum detection and correct empty-array literal generation (consistent
with the earlier usage at line 238).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 8c5540a6-e2c1-414e-a2da-b99e7eb25ec1
📒 Files selected for processing (5)
gestalt-di/src/main/java/org/terasology/gestalt/di/DefaultBeanContext.javagestalt-inject-java/build.gradle.ktsgestalt-inject-java/src/main/java/org/terasology/gestalt/annotation/processing/BeanDefinitionProcessor.javagestalt-module/src/main/java/org/terasology/gestalt/module/resources/ClasspathFileSource.javagestalt-module/src/main/java/org/terasology/gestalt/naming/Version.java
To help clarify the newest snapshot
Cervator
left a comment
There was a problem hiding this comment.
We've already been using a built snapshot of this for a while, just catching up with build logistics - bumped this to 8.0.2 for a clean snapshot, noted one test failure that may be inconsistent. Opting to merge to match reality then fix-forward the test as part of another newer PR also hitting test issues.
These changes are needed for Terasology to work with Gestalt DI. This is to go along with the main Terasology pull request.
It appears to do the following (although I am no longer certain of this):
!semver.preReleaseVersion().isEmpty()tosemver.preReleaseVersion().isPresent()(this may have been due to a breaking ABI change in the JSemver library)